{% extends 'base.html' %}
{% block app_content %}

    <html>
    <style>
        .table tr td {
            border: 1px solid white;
        }
    </style>
    <body>
    <ul class="breadcrumb">
        <li><a href="http://127.0.0.1:5000/review_hardware/">hardware</a></li>
        <li>
            <a href="http://127.0.0.1:5000/review_hardware/review_comment/{{ hardware_id }}">testcase</a>
        </li>
        <li class="active">{{ testcases.testcase_name }}</li>
    </ul>

    <div class="container">
        <div class="row text-center h3">{{ testcases.testcase_name }}评审意见</div>
    </div>
    <table class="table">
        <tr class="success">
            <td colspan="2"><span>admin</span>&nbsp; &nbsp; &nbsp; &nbsp;
                <span>2018-03-23 07:53:00</span></td>
        </tr>

        <tr>
            <td>{{ testcases.review_comments }}</td>
        </tr>
    </table>
    <!---评论区------>

    <table class="table">
        <caption>回帖区</caption>

        {% for item in sub_com %}
            <tr class="success">
                <td colspan="2"><span>{{ user_name }}</span>&nbsp; &nbsp;
                    &nbsp; &nbsp;
                    <span>{{ item.create_time }}</span></td>
            </tr>
            <tr>
                <td> {{ item.review_comments }}</td>
                <td><a onclick="return window.confirm('您想删除吗?');" href="http://127.0.0.1:5000/comment_del/{{ item.id }}/{{ testcases.id }}/{{ hardware_id }}/">删除</a></td>
            </tr>
            <tr>
                <td></td>
            </tr>
        {% endfor %}


    </table>
    <!---写评论------>
    {#    <form role="form" action="{{ url_for('home.comment',testcase_id=testcase_id, hardware_id=hardware_id) }}" method="post">#}
    {#        <div class="form-group">#}
    {#            <label for="name">写评论</label>#}
    {#            <input type="text" class="form-control" placeholder="写下您的评论...." name="2comment">#}
    {#            <input type="submit"  class="btn btn-primary btn-block btn-flat">#}
    {#        </div>#}
    {#    </form>#}

    <form id="form-data" method="post">
        <table width="94%" border="0" align="center" cellpadding="0"
               cellspacing="0" bordercolordark="#FFFFFF">
            <tr>
                {#                    <td width="14%" height="27">&nbsp;设备名称：</td>#}
                <td height="27" colspan="3">&nbsp;
                    {{ form.comment }}
                    {% for err in form.comment.errors %}
                        <span style="float:left;padding-top:10px;color:red">{{ err }}</span>
                    {% endfor %}
                </td>
            </tr>
            <tr>
                <td height="29" align="right">&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td height="38" colspan="1" align="center">
                    {{ form.csrf_token }}
                    {{ form.submit }}
                </td>
            </tr>
        </table>
    </form>

    </body>

{% endblock %}